package com.mapper;

import com.pojo.user;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface userMapper {
    @Select("select * from user")
    List<user> user_selectAll();

    @Select("select * from user where userAccount=#{userAccount} and userPassword=#{userPassword}")
    user user_login(@Param("userAccount") String userAccount,@Param("userPassword") String userPassword);

    /**
     * 根据id查询昵称
     */
    @Select("select userName from user where userId = #{userId}")
    String user_selectName(int userId);

}
